<template>
  <div class="titlm">
    <div class="bigboxs" v-if="types=='未接收'||types=='已接收'" @click="pendings(id)">
        <div class="labelq">待完成</div>
        <p class="lids" style="font-size:40rpx;">{{title}}</p>
        <p class="lids">布置老师：{{teacher}}</p>
        <p class="lids">布置时间：{{Arrangementtime}}</p>
    </div>
  </div>
</template>
<script>
export default {
  data(){
    return {

    }
  },
  props: {
    id: Number,
    title: String,
    starts: Number,
    types: Number,
    teacher: String

  },
    computed:{
    Arrangementtime(){
     return new Date(this.starts).getFullYear() +"-" +(new Date(this.starts).getMonth() + 1) +"-" +new Date(this.starts).getDate() +" " +new Date(this.starts).getHours() +":" +new Date(this.starts).getMinutes() +":" +new Date(this.starts).getSeconds();
    }
  },
    mounted() {
    this.start();
  },
  methods: {
    pendings(v){
      wx.navigateTo({
        url: `../../pages/Writehomework/main?id=${v}`
      });
    },
    start(){

    },
  }
};
</script>
<style>
.bigboxs{
  padding: 30rpx;
  margin-bottom: 20rpx;
  background-color:#fff;
  position: relative;
  overflow:hidden;
}
.lids{
  margin-bottom:15rpx;

}
.labelq{
font-size:13px;
color:#ffffff;
line-height:44px;
background:red;
position:absolute;
right:0;
z-Index:2;
padding:0 2em;
-webkit-transform-origin:left bottom;
-moz-transform-origin:left bottom;
transform-origin:left bottom;
-webkit-transform:translate(29.29%,-100%) rotate(45deg);
-moz-transform:translate(29.29%,-100%) rotate(45deg);
transform:translate(29.29%,-100%) rotate(45deg);
text-indent:0;
top:0;
}
</style>
